<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>{$siteInfo['title']}-{$siteInfo['subtitle']}</title>
  <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
  <meta name="description" content="{$siteInfo['description']}">
  <meta name="keywords" content="{$siteInfo['keyword']}">
  <meta name="author" content="Teen">
  <link rel="stylesheet" href="/themes/default/static/element-ui-2.12/index.css">
  <link rel="stylesheet" href="/themes/default/static/css/common.css" />
  <link rel="stylesheet" href="/themes/default/static/css/home.css" />
  <link rel="stylesheet" href="/themes/default/static/css/shop.css" />
</head>
<body>
<div id="app">
  {include file="common/header" /}
  <!--轮播图-->
  <template>
    <div class="block">
      <el-carousel height="600px">
        {volist name="carousel" id="vo"}
        <a href="{:url('/p/'.$vo.id)}">
          <el-carousel-item>
            <img class="carousel-img" src="{$vo.cover_image|default='/uploads/default/default_cover.jpg'}" />
            <div class="carousel-title">{$vo.title}</div>
          </el-carousel-item>
        </a>
        {/volist}
      </el-carousel>
    </div>
  </template>
<!--最新商品-->
  <div class="titleCenter">
    <p>置顶推荐</p>
    <span>Top recommendation</span>
  </div>
  <div class="with1200 commodity-list">
    <el-row :gutter="10">
      {volist name="topArticle" id="vo"}
      <el-col :span="6" >
        <a href="{:url('/p/'.$vo.id)}">
          <el-card :body-style="{ padding: '0px' }" style="margin:10px;" shadow="hover">
            <img src="{$vo.cover_image|default='/uploads/default/default_cover.jpg'}" class="image">
            <div style="padding: 14px;">
              <span style="display: block;height: 50px">{$vo.title|strip_tags|mb_substr=0,33}</span>
            </div>
          </el-card>
        </a>
      </el-col>
      {/volist}
    </el-row>
  </div>
  <!--最新资讯-->
  <div class="titleCenter">
    <p>最新资讯</p>
    <span>Latest information</span>
  </div>
  <div class="with1200 news">
    {volist name="newsList" id="vo"}
    <div class="news-item">
      <el-row>
        <el-col :span="5" ><img src="{$vo.cover_image|default='/uploads/default/default_cover.jpg'}" /></el-col>
          <el-col :span="19" style="color: #999">
              <a href="/p/{$vo.id}.html"><h3>{$vo.title}</h3></a>
              <el-tag effect="dark" type="danger">{$vo.cate.cate_name}</el-tag>
              <i class="el-icon-user-solid"></i><span style="font-size: 12px;">{$vo.userInfo.username}</span>
              <i class="el-icon-view"></i><span style="font-size: 12px;">&nbsp;{$vo.read_count}</span>
          <p>{$vo.content|strip_tags|mb_substr=0,50}</p>
        </el-col>
      </el-row>
    </div>
    <div class="hr"></div>
    {/volist}
  </div>
  <div class="with1200">
    <a href="/news"><el-button type="primary" style="width: 100%" plain>查看更多</el-button></a>
  </div>
</div>
{include file="common/footer" /}
</body>
<script src="https://cdn.bootcss.com/vue/2.6.10/vue.min.js"></script>
<script src="https://unpkg.com/element-ui@2.12.0/lib/index.js"></script>
<script type="text/javascript" src="/themes/default/static/js/jquery-3.2.1.min.js" ></script>
<script type="text/javascript" src="/themes/default/static/js/home.js" ></script>
<script src="https://cdn.bootcss.com/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js"></script>
<script type="text/javascript" src="/themes/default/static/js/common.js" ></script>
<script>
  new Vue({
    el: '#app'
  })
</script>
</html>